package com.weita.lightfood.model.dao;


import com.weita.lightfood.model.entity.HealthReport;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

/**
 * @author IT_Monster at 2019/04/19 21:50.
 * 健康报表dao接口
 */
@Mapper
@Repository
public interface HealthReportDao{
    /**
     * 插入用户健康表
     * @param healthReport
     * @return
     * @throws Exception
     */
    int creatReport(HealthReport healthReport) throws Exception;

    /**
     * 获取用户健康报表
     * @param userId
     * @return
     * @throws Exception
     */
    HealthReport getHealthReport(int userId) throws Exception;


    /**
     * 获取用户健康报表id
     * @param userId
     * @return
     * @throws Exception
     */
    int getReportId(int userId) throws Exception;

    /**
     * 获取用户健康报表预算热量
     * @param userId
     * @return
     * @throws Exception
     */
    double getCalorieBudget(int userId) throws Exception;

    /**
     * 获取用户身材类型
     * @param userId
     * @return
     * @throws Exception
     */
    String getBodyType(int userId) throws Exception;

    /**
     * 获取用户健康指数
     * @param userId
     * @return
     * @throws Exception
     */
    int getIndex(int userId) throws Exception;

    /**
     * 获取用户健康评级
     * @param userId
     * @return
     * @throws Exception
     */
    String getLevel(int userId) throws Exception;

    /**
     * 获取用户bmi
     * @param userId
     * @return
     * @throws Exception
     */
    double getBmi(int userId) throws Exception;

    /**
     * 获取用户bfr
     * @param userId
     * @return
     * @throws Exception
     */
    double getBfr(int userId) throws Exception;


    /**
     * 更新用户健康表
     * @param report
     * @throws Exception
     */
    void updateReport(HealthReport report) throws Exception;
}
